//  @ Project : GagalPanen
//  @ File Name : cell.cpp
//  @ Date : 3/9/2011
//  @ Author : Denis
//
//


#include "cell.hpp"
#include "gamemaps.hpp"
#include "gridmap.hpp"
#include "creatures.hpp"

Cell::Cell(GameInterface* game) {
  game_ = game;
}

Cell::Cell(GameInterface* game, std::ifstream& is) {
  game_ = game;
}

void Cell::save(std::ofstream& os) {
  
}

Cell::~Cell() {
}

GridMap* Cell::getContainingMap() {
  return game_->getMaps()->getMapContaining(this);
}

int Cell::getX() {
  return getContainingMap()->getGrid()->getX(this);
}

int Cell::getY() {
  return getContainingMap()->getGrid()->getY(this);
}

bool Cell::containsUnsteppableCreature() {
  return game_->getCreatures()->containsUnsteppableCreatureAt(this);
}
